package com.dayuanit.dy8.mall.springbootmall.controller;

import com.dayuanit.dy8.mall.springbootmall.dto.ResponseDTO;
import com.dayuanit.dy8.mall.springbootmall.service.CommonService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class CommodityController {

    @Autowired
    private CommonService commonService;

    @RequestMapping("/loadCommonInfo/{commoId}")
    public ResponseDTO loadCommonInfo(@PathVariable("commoId") int commoId) {
        return ResponseDTO.success(commonService.loadCommon(commoId));
    }


}
